<script setup lang="ts">
import { ref } from 'vue'

// 模拟服务数据
const services = ref([
  { 
    id: 1, 
    title: 'Web开发服务', 
    description: '我们提供专业的网站开发服务，包括前端和后端开发、响应式设计和性能优化。',
    icon: '💻'
  },
  { 
    id: 2, 
    title: '移动应用开发', 
    description: '为iOS和Android平台开发高质量的移动应用，提供流畅的用户体验和强大的功能。',
    icon: '📱'
  },
  { 
    id: 3, 
    title: 'UI/UX设计', 
    description: '专业的用户界面和用户体验设计服务，帮助您创建直观、美观且易用的产品。',
    icon: '🎨'
  },
  { 
    id: 4, 
    title: '数据分析', 
    description: '提供数据分析和可视化服务，帮助您从数据中获取有价值的洞察并做出明智决策。',
    icon: '📊'
  },
])
</script>

<template>
  <div class="services-container">
    <h1 class="page-title">我们的服务</h1>
    
    <div class="services-list">
      <div v-for="service in services" :key="service.id" class="service-item">
        <div class="service-icon">{{ service.icon }}</div>
        <h3 class="service-title">{{ service.title }}</h3>
        <p class="service-description">{{ service.description }}</p>
        <button class="learn-more-btn">了解更多</button>
      </div>
    </div>
  </div>
</template>

<style scoped>
.services-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #333;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}

.service-item {
  text-align: center;
  padding: 32px 24px;
  background-color: #f9f9f9;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.service-icon {
  font-size: 3.5rem;
  margin-bottom: 24px;
}

.service-title {
  font-size: 1.4rem;
  margin-bottom: 16px;
  color: #333;
}

.service-description {
  color: #666;
  margin-bottom: 24px;
  line-height: 1.6;
}

.learn-more-btn {
  padding: 10px 24px;
  background-color: #2ecc71;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.learn-more-btn:hover {
  background-color: #27ae60;
}
</style>